#ifndef __SOUND_H__
#define __SOUND_H__



#define	SOUND_ACC_INDEX			0
#define 	SOUND_BRK_INDEX			1
#define	SOUND_ENGINEOFF_INDEX	2
#define	SOUND_ENGINEON_INDEX		3
#define  SOUND_LINK_INDEX			4
#define	SOUND_NEWDATA_INDEX		5
#define	SOUND_RESTART_INDEX		6
#define	SOUND_SLEEP_INDEX			7
#define	SOUND_START_INDEX			8
#define	SOUND_TIMESYNC_INDEX		9
#define	SOUND_WIFIIN_INDEX		10
#define	SOUND_WIFIOFF_INDEX		11
#define	SOUND_WIFION_INDEX		12

#define SOUND_OFF 0
#define SOUND_ON	1

#define	SL_BUF_SIZE 16
#define	SL_DATA_LEN 1

struct sound_list{
	int writepos;
	int readpos;
	int list[SL_BUF_SIZE * SL_DATA_LEN];
	pthread_mutex_t lock;
	pthread_cond_t notempty;
	pthread_cond_t notfull;
};

extern struct sound_list sl;
extern int Sound_status;

extern void saveSoundList(struct sound_list *sl, int data, int status);
extern void * Start_Sound(void * data);

#endif
